/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #8B0000;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* 游戏设置面板 */
.game-settings {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 250px;
}

.game-settings h3 {
    color: #8B0000;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

.mode-selector label,
.ai-difficulty {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.ai-difficulty select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.score-board .score {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
}

.game-info div {
    margin-bottom: 8px;
    padding: 5px 0;
    font-weight: bold;
}

#gameStatus {
    color: #8B0000;
}

#currentTurn {
    color: #8B0000; /* 默认红方 */
}

/* 棋盘容器 */
.board-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#chessBoard {
    border: 2px solid #8B4513;
    border-radius: 4px;
    background-color: #E8C57A;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 控制按钮 */
.control-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.control-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.control-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.control-btn.primary {
    background-color: #8B0000;
    color: white;
}

.control-btn.primary:hover:not(:disabled) {
    background-color: #A52A2A;
}

.control-btn:not(.primary) {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.control-btn:not(.primary):hover:not(:disabled) {
    background-color: #e0e0e0;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .game-settings {
        width: 100%;
        max-width: 400px;
    }
    
    #chessBoard {
        width: 100%;
        height: auto;
        max-width: 400px;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .control-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .control-btn {
        width: 100%;
    }
}